/*
 * LocalSingletonDB.h
 *
 *  Created on: May 4, 2012
 *      Author: soniclin
 */

#ifndef LOCAL_SINGLETON_DB_H
#define LOCAL_SINGLETON_DB_H

#include <vector>
#include "ImmersedObject.h"
#include "Sphere.h"

template<typename T, class ImmersedObjType>
class LocalSingletonDB
{
public:

	virtual ~LocalSingletonDB();

	LocalSingletonDB<T>* instance();

	std::vector< ImmersedObject<T> >& getObjectChain();

	std::vector< Sphere< ImmersedObject<T> > >& getSphereChain();

private:

	LocalSingletonDB();

	LocalSingletonDB(const LocalSingletonDB& rhs);

private:

	std::vector< ImmersedObject<T> > immersedObjectChain;

	std::vector< Sphere< ImmersedObject<T> > > immersedSphereChain;

private:

	LocalSingletonDB<T>* instance;

};

#endif /* LOCAL_SINGLETON_DB_H */
